print('{0}'.format(1))
str = 'aaaa'
print(f'这个程序{str}')
for i in range(1,10):
    for j in range(1,i+1):
        print(f'{i}x{j}={i * j}\t',end=" ")
    print()
for i in range(0,101,2):
    print("----开始下载----")
    if i==100:
        print("下载完成")
        break
    else:
        print(f'{i}%[',"*"*(i//2),"."*(50-i//2),']')

sep = ','
print(sep.join(str))
print(str.upper())
print("good".center(20,'*'))

word = 'n'
str1 = 'personality'
result = str1.find(word)
print(result)



#分界线
print("--------------------------------列表-----------------------------------------")
#列表
list1 = [1,2,3,4,5]
for i in range(len(list1)):
    print(list1[i], end=' ')
print()
for i in list1:
    print(i,end=' ')
print()
list1.append(6)
print(list1)
list2 = [8,9]
list1.extend(list2)
print(list1)
print(list2)
list2.insert(2,7)
print(list2)
list2.sort() #排序
print(list2)
list2.reverse() #反转
print(list2)
list3 = [14,22,3,4,5]
list4 = sorted(list3) #返回新列表，原列表不变
print(list4)
list4.remove(14) #移走匹配到的第一个元素
print(list4)
del list4[0]
print(list4)
num = list4.pop() #返回删除的元素
print(num)
print(list4)
#集合
set1 = {1,2,3,4,5}
for i in set1:
    print(i, end=' ')
print()
set1.add(6)
print(set1)

#字典
dict1 = {'name':'zhangshan','age':'18'}
values = dict1.values()
for value in values:
    print(value)

